<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ApplicationuserEditDlg" widgetVar="ApplicationuserEditDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.EditApplicationuserTitle}">
            <h:form id="ApplicationuserEditForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{applicationuserControllerNew.selected != null}">
                        <p:outputLabel value="#{bundle.EditApplicationuserLabel_id}" for="id" />
                        <p:inputText id="id" value="#{applicationuserControllerNew.selected.id}" title="#{bundle.EditApplicationuserTitle_id}" required="true" requiredMessage="#{bundle.EditApplicationuserRequiredMessage_id}"/>
                        <p:outputLabel value="#{bundle.EditApplicationuserLabel_username}" for="username" />
                        <p:inputText id="username" value="#{applicationuserControllerNew.selected.username}" title="#{bundle.EditApplicationuserTitle_username}" required="true" requiredMessage="#{bundle.EditApplicationuserRequiredMessage_username}"/>
                        <p:outputLabel value="#{bundle.EditApplicationuserLabel_encryptedpwd}" for="encryptedpwd" />
                        <p:inputText id="encryptedpwd" value="#{applicationuserControllerNew.selected.encryptedpwd}" title="#{bundle.EditApplicationuserTitle_encryptedpwd}" required="true" requiredMessage="#{bundle.EditApplicationuserRequiredMessage_encryptedpwd}"/>
                        <p:outputLabel value="#{bundle.EditApplicationuserLabel_personid}" for="personid" />
                        <p:selectOneMenu id="personid" value="#{applicationuserControllerNew.selected.personid}" required="true" requiredMessage="#{bundle.EditApplicationuserRequiredMessage_personid}">
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{personController.itemsAvailableSelectOne}"
                                           var="personidItem"
                                           itemValue="#{personidItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{applicationuserControllerNew.updateApplicationuser()}" value="#{bundle.Save}" update="display,:ApplicationuserListForm:datalist,:growl" oncomplete="handleSubmit(args, 'ApplicationuserEditDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ApplicationuserEditDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
